<?php

echo "<h2>Function disp_data highlights age if its more than 30 years</h2>";

$Bannister = array('name' => "Hankey", 'sname' => "Bannister", 'age' => 40, 'sex' => 'male');
$Daniels = array('name' => "Jack", 'sname' => "Daniels", 'age' => 50, 'sex' => 'male');
$Walker = array('name' => "Johnnie", 'sname' => "Daniels", 'age' => 30, 'sex' => 'male');

function disp_data($record = array()) {
    echo "<table border width = 20%><tr><td>" . $record['name'] . "</td><td>" . $record['sname'] . "</td><td>" . ($record['age'] > 30 ? "<font color = red>" . $record['age'] . "</font>" : $record['age']) . "</td><td>" . $record['sex'] . "</td></tr></table><br>";
}

disp_data($Bannister);
disp_data($Daniels);
disp_data($Walker);
?>
